package com.chinamobile.ln.ictenterprises.utils;

import java.util.Collection;
import java.util.Map;

public class ValidateUtil
{

    public static boolean isNotEmpty(Collection<?> collect)
    {
        return (null != collect && collect.size() > 0) ? true : false;
    }

    public static boolean isEmpty(Collection<?> collect)
    {
        return (null == collect || collect.size() == 0) ? true : false;
    }

    public static boolean isNotBlank(Collection<?> collect)
    {
        return (null != collect) ? true : false;
    }

    public static boolean isBlank(Collection<?> collect)
    {
        return (null == collect) ? true : false;
    }

    public static boolean isNotEmpty(Map<?, ?> map)
    {
        return (null != map && map.size() > 0) ? true : false;
    }

    public static boolean isEmpty(Map<?, ?> map)
    {
        return (null == map || map.size() == 0) ? true : false;
    }

    public static boolean isNotBlank(Map<?, ?> map)
    {
        return (null != map) ? true : false;
    }

    public static boolean isBlank(Map<?, ?> map)
    {
        return (null == map) ? true : false;
    }

    public static boolean isNotEmpty(String value)
    {
        return (null != value && value.length() > 0) ? true : false;
    }

    public static boolean isEmpty(String value)
    {
        return (null == value || value.length() == 0) ? true : false;
    }

    public static boolean isNotBlank(String value)
    {
        return (null != value) ? true : false;
    }

    public static boolean isBlank(String value)
    {
        return (null == value) ? true : false;
    }

}
